﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="List.aspx.vb" Inherits="Universities.Uni_List" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
    DataKeyNames="ID" DataSourceID="UniDataSource" CellPadding="4" 
    ForeColor="#333333" GridLines="None" AllowSorting="True">
    <AlternatingRowStyle CssClass="AlternativeRowStyle" />
    <Columns>
        <asp:ImageField DataImageUrlField="Logo" HeaderText="University Logo">
            <ControlStyle Height="150px" Width="150px" />
            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
        </asp:ImageField>
        <asp:HyperLinkField DataNavigateUrlFields="ID" 
            DataNavigateUrlFormatString="Details.aspx?ID={0}" DataTextField="uni_name" 
            HeaderText="University Name" SortExpression="Uni_Name" />
        <asp:BoundField DataField="motto" HeaderText="motto" SortExpression="motto" />
        <asp:BoundField DataField="established" HeaderText="established" 
            SortExpression="established" />
        <asp:BoundField DataField="location" HeaderText="location" 
            SortExpression="location" />
        <asp:HyperLinkField DataTextField="website" HeaderText="Website" 
            DataNavigateUrlFields="website" DataNavigateUrlFormatString="{0}" 
            SortExpression="website" />
    </Columns>
    <EditRowStyle BackColor="#7C6F57" />
        <FooterStyle CssClass="__footerStyle"/>
        <HeaderStyle CssClass="__headerStyle"/>
        <PagerStyle CssClass="__pagerStyle"/>
        <RowStyle CssClass="__rowStyle" />
        <SelectedRowStyle CssClass="__SelectedRowStyle"/>
        <SortedAscendingCellStyle CssClass="__SortedAscendingCellStyle" />
        <SortedAscendingHeaderStyle CssClass="__SortedAscendingHeaderStyle"/>
        <SortedDescendingCellStyle CssClass="__SortedDescendingCellStyle"/>
        <SortedDescendingHeaderStyle CssClass="__SortedDescendingHeaderStyle"/>
</asp:GridView>
<asp:SqlDataSource ID="UniDataSource" runat="server" 
    ConnectionString="<%$ ConnectionStrings:UniConnectionString %>" 
    ProviderName="<%$ ConnectionStrings:UniConnectionString.ProviderName %>" 
    SelectCommand="SELECT [uni_name], [established], [location], [website], [motto], [Logo], [ID] FROM [universities]">
</asp:SqlDataSource>
</asp:Content>
